package com.example.java.Controller;

import com.example.java.Mapper.ImgMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;
import java.util.Objects;

@RestController
@RequestMapping("/img")
public class ImgController {

    @Autowired
    private ImgMapper imgMapper;

    @GetMapping("/all")
    public List<String> getbase(){
        return imgMapper.getBase();
    }

    @PostMapping("/add")
    public String setbase(String avatar,Integer id){
        return imgMapper.setBase(avatar,id);
    }

}
